#include <boost/graph/adjacency_list.hpp>
using namespace boost;

#include <iostream>
using namespace std;

int
main()
{
  typedef no_property VertexProperty;
  typedef no_property EdgeProperty;
  typedef adjacency_list<vecS,vecS,directedS,
    VertexProperty,EdgeProperty> graph_t;

  typedef graph_traits<graph_t>::vertex_descriptor vertex_descriptor;
  typedef graph_traits<graph_t>::edge_descriptor edge_descriptor;
  typedef graph_traits<graph_t>::edge_iterator edge_iterator;
  
  size_t N =10;
  graph_t g( N);
  
  bool inserted;
  edge_descriptor e;
  tie( e, inserted) =add_edge( 0, 1, g);
  std::cout <<"edge: "<< e <<", inserted: " <<inserted <<std::endl;
  
  tie( e, inserted) =add_edge( 3, 7, g);
  std::cout <<"edge: "<< e <<", inserted: " <<inserted <<std::endl;

  tie( e, inserted) =add_edge( 0, 1, g);
  std::cout <<"edge: "<< e <<", inserted: " <<inserted <<std::endl;

  remove_edge( 0, 1, g);
  
  tie( e, inserted) =add_edge( 1, 0, g);
  std::cout <<"edge: "<< e <<", inserted: " <<inserted <<std::endl;

  edge_iterator iter, last;
  tie( iter, last) =edges( g);
  for( ; iter !=last; ++iter)
    std::cout <<*iter <<std::endl;

  return 0;
}
